package com.hfh.server.rabbitmq.SendMessage;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * @author liuxinghong
 * @Description:
 * @date 2019/8/28 002810:53
 */
@Component
public class SendTest  implements ApplicationListener<ContextRefreshedEvent> {

    @Autowired
    private SendRabbitMessageService sendRabbitMessage;


    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        String message = "http://192.169.0.96:8291/fh/wechat/farmhouseWc/pageApplets";
        String routingKey = "123456";//暂时设置为农家乐id
        for (int i=0; i<1;i++){
           // sendRabbitMessage.sendPrinterMessage(message,routingKey);
        }
    }
}
